<template>
	<view class="container">
		<u-navbar leftIconColor="#fff" title="关于我们" :autoBack="true" placeholder bgColor="transparent"></u-navbar>

		<view class="centerXY columnY pad-top-96 mar-bottom-160">
			<image class="logo radius24" src="../../static/image/logo.png" mode=""></image>
		</view>

		<view class="pad-26">
			<view class="centerY betweenX font-28">
				<view>当前版本</view>
				<view class="centerY">
					<text>1.0.3</text>
					<u-icon class="mar-left-20" name="arrow-right" size="12"></u-icon>
				</view>
			</view>

			<view class="mar-top-50">
				<view class="font-30 font-w-500">关于我们：</view>
				<view class="font-30 mar-top-24">
					<u-parse :content="content"></u-parse>
				</view>
			</view>

			<view class="centerXY mar-top-100 font-28 color-theme">
				<text @click="hanldeAgreement('user_agreement','用户隐私协议')">《用户隐私协议》</text>
				<text @click="hanldeAgreement('terms_use','服务协议')">《服务协议》</text>
			</view>
		</view>
	</view>
</template>

<script>
	// 接口地址
	import {
		configIndex
	} from '@/config/api.js'
	export default {
		name: "pay-notes",
		data() {
			return {
				content: ""
			};
		},
		created() {
			this.getDataInfo();
		},
		methods: {
			// 跳转协议页面
			hanldeAgreement(code, text) {
				uni.navigateTo({
					url: '/pages/agreement/agreement?code=' + code + '&text=' + text
				})
			},
			// 获取数据
			getDataInfo() {
				configIndex({
					code_arr: ['about_us']
				}).then(res => {
					this.content = res.data.about_us;
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.container {
		min-height: 100vh;

		.logo {
			display: block;
			width: 144rpx;
			height: 144rpx;
		}
	}
</style>